<template>
    <div class="tophead">
        <!--<mt-header title="朗润居物业报修系统" class="header">-->
            <!--<router-link to="/home" slot="left">-->
                <!--<mt-button icon="back"></mt-button>-->
            <!--</router-link>-->
        <!--</mt-header>-->
        <div class="th-l" @click="backAction"><i class="icon iconfont icon-back"></i></div>
        <div class="th-title">朗润居物业报修</div>
        <div class="th-r">
            <slot name="r">右侧插槽</slot>
        </div>
    </div>
</template>

<script>

    export default {
        name: "top-header",
        prop:["title","backurl"],
        date(){
            return{

            };
        },
        methods:{
            backAction(){
                console.log("backurl:"+this.backurl);
                if(this.backurl){
                    this.$router.push(this.backurl);
                }
                else {
                    this.$router.go(-1);
                }
            }
        },
        mounted(){

        }
    }
</script>

<style scoped>
    .tophead{
        display: flex;
        justify-content: space-between;
        height: 60px;
        line-height: 60px;
        color: #F7F7F7;
        font-family: "Malgun Gothic";
        font-size: 18px;
        background-color: #10903d;
        border-radius: 2px;
    }
    .th-l{
        padding-left: 25px;
    }
    .th-title{
        text-align: center;
    }
    .th-r{
        padding-right: 25px;
    }
    .icon{
        font-size: 20px;
    }
    .header{
        background-color: #63a35c;
        color: #666666;
        border-radius: 5px;
    }
</style>